/* import Vuex from 'vuex'

let store = new Vuex.Store({
  state:{
    dataList:[]
  },
  mutations:{
    changeDom(state,payload){
      state.dataList = payload
    }

  },
  actions:{

  },
  getters:{//计算想要的数据格式
    dataList(state){
      return state.dataList
    }

  }
})

export default store; */

import {createStore} from 'vuex'

const store = createStore({
  state(){
    return{
      dataList:[]
    }
  },
  mutations:{
    changeDom(state,payload){
      // console.log(payload);
      state.dataList = payload
      
    }

  },
  actions:{

  },
  getters:{//计算想要的数据格式
    dataList(state){
      return state.dataList
    }

  }

})

export default store; 